
public class MirrorPicture
{

   public static void main(String[] args)
   {
      Picture original = new Picture("/Users/locphan/Documents/workspace/Lab9/src/butterfly.jpg");
      Picture modifier = new Picture("/Users/locphan/Documents/workspace/Lab9/src/butterfly.jpg");
      
      int width = modifier.getWidth();
      int height = modifier.getHeight();
      
      int midpoint = width/2;
      int last = width - 1;
      
      Pixel right = null;
      Pixel left = null;
      
      for(int x=0;x<midpoint;x++)
      {
         for(int y=0;y<height;y++)
         {
            //Pixel pix = modifier.getPixel(x, y);
            //pix.setGreen(0);
            
            left = modifier.getPixel(x, y);
            right = modifier.getPixel(last-x,y);
            
            right.setColor(left.getColor());
            left.setColor(right.getColor());
         }
      }
      
      original.show();
      modifier.show();

    }

}
